<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Sifteo::AffineMatrix Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>Sifteo</b></li><li class="navelem"><a class="el" href="struct_sifteo_1_1_affine_matrix.html">AffineMatrix</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_sifteo_1_1_affine_matrix-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Sifteo::AffineMatrix Struct Reference<div class="ingroups"><a class="el" href="group__math.html">Math</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>An augmented 3x2 matrix, for doing 2D affine transforms.  
 <a href="struct_sifteo_1_1_affine_matrix.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="math_8h_source.html">sifteo/math.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aebf43759013b88f76375433e977d3306"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aebf43759013b88f76375433e977d3306"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#aebf43759013b88f76375433e977d3306">AffineMatrix</a> ()</td></tr>
<tr class="memdesc:aebf43759013b88f76375433e977d3306"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an uninitialized matrix. <br/></td></tr>
<tr class="separator:aebf43759013b88f76375433e977d3306"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fab8532bd91c8edc8824b027254f0e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0fab8532bd91c8edc8824b027254f0e2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a0fab8532bd91c8edc8824b027254f0e2">AffineMatrix</a> (float _xx, float _yx, float _cx, float _xy, float _yy, float _cy)</td></tr>
<tr class="memdesc:a0fab8532bd91c8edc8824b027254f0e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a matrix from six scalar values. <br/></td></tr>
<tr class="separator:a0fab8532bd91c8edc8824b027254f0e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2aec3f033f6eb7d0c8c60b7460108fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af2aec3f033f6eb7d0c8c60b7460108fc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#af2aec3f033f6eb7d0c8c60b7460108fc">operator*=</a> (const <a class="el" href="struct_sifteo_1_1_affine_matrix.html">AffineMatrix</a> &amp;m)</td></tr>
<tr class="memdesc:af2aec3f033f6eb7d0c8c60b7460108fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix multiplication. <br/></td></tr>
<tr class="separator:af2aec3f033f6eb7d0c8c60b7460108fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0ed2edc61f2ba6823f64a7c3da58146"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0ed2edc61f2ba6823f64a7c3da58146"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#ac0ed2edc61f2ba6823f64a7c3da58146">rotate</a> (float angle)</td></tr>
<tr class="memdesc:ac0ed2edc61f2ba6823f64a7c3da58146"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compose this matrix with a rotation by 'angle' radians. <br/></td></tr>
<tr class="separator:ac0ed2edc61f2ba6823f64a7c3da58146"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af54d14b31203b446154d4e39d2a96376"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af54d14b31203b446154d4e39d2a96376"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#af54d14b31203b446154d4e39d2a96376">scale</a> (float s)</td></tr>
<tr class="memdesc:af54d14b31203b446154d4e39d2a96376"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compose this matrix with a scale by factor 's'. <br/></td></tr>
<tr class="separator:af54d14b31203b446154d4e39d2a96376"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39b6a91f9aea7e909a99d237c09da0fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39b6a91f9aea7e909a99d237c09da0fd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a39b6a91f9aea7e909a99d237c09da0fd">translate</a> (float x, float y)</td></tr>
<tr class="memdesc:a39b6a91f9aea7e909a99d237c09da0fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compose this matrix with a translation by (x, y) <br/></td></tr>
<tr class="separator:a39b6a91f9aea7e909a99d237c09da0fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44a91e82d3fd746d8adf9b447c3a2851"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44a91e82d3fd746d8adf9b447c3a2851"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a44a91e82d3fd746d8adf9b447c3a2851">translate</a> (<a class="el" href="group__math.html#ga142c5de33f25b2f04428b16b309c9765">Float2</a> v)</td></tr>
<tr class="memdesc:a44a91e82d3fd746d8adf9b447c3a2851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compose this matrix with a translation by vector 'v'. <br/></td></tr>
<tr class="separator:a44a91e82d3fd746d8adf9b447c3a2851"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a5d02c1b0d8b57b18cbd11dd8040bd2d5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d02c1b0d8b57b18cbd11dd8040bd2d5"></a>
static <a class="el" href="struct_sifteo_1_1_affine_matrix.html">AffineMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a5d02c1b0d8b57b18cbd11dd8040bd2d5">identity</a> ()</td></tr>
<tr class="memdesc:a5d02c1b0d8b57b18cbd11dd8040bd2d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the identity matrix. <br/></td></tr>
<tr class="separator:a5d02c1b0d8b57b18cbd11dd8040bd2d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa71c9d3e051ec0d088747352bc104a4e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa71c9d3e051ec0d088747352bc104a4e"></a>
static <a class="el" href="struct_sifteo_1_1_affine_matrix.html">AffineMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#aa71c9d3e051ec0d088747352bc104a4e">rotation</a> (float angle)</td></tr>
<tr class="memdesc:aa71c9d3e051ec0d088747352bc104a4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a matrix which rotates by 'angle' radians. <br/></td></tr>
<tr class="separator:aa71c9d3e051ec0d088747352bc104a4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a635753a6897eea73ef7f02aecc84da56"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a635753a6897eea73ef7f02aecc84da56"></a>
static <a class="el" href="struct_sifteo_1_1_affine_matrix.html">AffineMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a635753a6897eea73ef7f02aecc84da56">scaling</a> (float s)</td></tr>
<tr class="memdesc:a635753a6897eea73ef7f02aecc84da56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a matrix which scales by a factor of 's'. <br/></td></tr>
<tr class="separator:a635753a6897eea73ef7f02aecc84da56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a628e4847a021a4503c803db1b828d64c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a628e4847a021a4503c803db1b828d64c"></a>
static <a class="el" href="struct_sifteo_1_1_affine_matrix.html">AffineMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a628e4847a021a4503c803db1b828d64c">translation</a> (float x, float y)</td></tr>
<tr class="memdesc:a628e4847a021a4503c803db1b828d64c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a matrix which translates by (x, y) <br/></td></tr>
<tr class="separator:a628e4847a021a4503c803db1b828d64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ac9fd8e39295eee06566fd45555f361"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ac9fd8e39295eee06566fd45555f361"></a>
static <a class="el" href="struct_sifteo_1_1_affine_matrix.html">AffineMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a2ac9fd8e39295eee06566fd45555f361">translation</a> (<a class="el" href="group__math.html#ga142c5de33f25b2f04428b16b309c9765">Float2</a> v)</td></tr>
<tr class="memdesc:a2ac9fd8e39295eee06566fd45555f361"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a matrix which translates by vector 'v'. <br/></td></tr>
<tr class="separator:a2ac9fd8e39295eee06566fd45555f361"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a1159378a07ac177ee26ba7460e77efc8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1159378a07ac177ee26ba7460e77efc8"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a1159378a07ac177ee26ba7460e77efc8">cx</a></td></tr>
<tr class="memdesc:a1159378a07ac177ee26ba7460e77efc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix member cx, the constant offset for X. <br/></td></tr>
<tr class="separator:a1159378a07ac177ee26ba7460e77efc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a633cc1c8eb9d03698e395230ee3b5ef4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a633cc1c8eb9d03698e395230ee3b5ef4"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a633cc1c8eb9d03698e395230ee3b5ef4">cy</a></td></tr>
<tr class="memdesc:a633cc1c8eb9d03698e395230ee3b5ef4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix member cy, the constant offset for Y. <br/></td></tr>
<tr class="separator:a633cc1c8eb9d03698e395230ee3b5ef4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac26e83ff5e2698516813b3032c8b9795"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac26e83ff5e2698516813b3032c8b9795"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#ac26e83ff5e2698516813b3032c8b9795">xx</a></td></tr>
<tr class="memdesc:ac26e83ff5e2698516813b3032c8b9795"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix member xx, the horizontal X delta. <br/></td></tr>
<tr class="separator:ac26e83ff5e2698516813b3032c8b9795"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b3fcff7820d2ab5d160f74204723e65"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9b3fcff7820d2ab5d160f74204723e65"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#a9b3fcff7820d2ab5d160f74204723e65">xy</a></td></tr>
<tr class="memdesc:a9b3fcff7820d2ab5d160f74204723e65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix member xy, the horizontal Y delta. <br/></td></tr>
<tr class="separator:a9b3fcff7820d2ab5d160f74204723e65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada7a312253d20f2dfc734d6a6b8a0428"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada7a312253d20f2dfc734d6a6b8a0428"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#ada7a312253d20f2dfc734d6a6b8a0428">yx</a></td></tr>
<tr class="memdesc:ada7a312253d20f2dfc734d6a6b8a0428"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix member yx, the vertical X delta. <br/></td></tr>
<tr class="separator:ada7a312253d20f2dfc734d6a6b8a0428"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa32dde48158e502f49be4956cd67f43b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa32dde48158e502f49be4956cd67f43b"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html#aa32dde48158e502f49be4956cd67f43b">yy</a></td></tr>
<tr class="memdesc:aa32dde48158e502f49be4956cd67f43b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Matrix member yy, the vertical Y delta. <br/></td></tr>
<tr class="separator:aa32dde48158e502f49be4956cd67f43b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An augmented 3x2 matrix, for doing 2D affine transforms. </p>
<pre class="fragment"> [ xx  yx  cx ]
 [ xy  yy  cy ]
 [  0   0   1 ]
</pre><p>The way we use affine transforms for background scaling are very similiar to the mechanism used by the GameBoy Advance PPU. There's a great tutorial on this at:</p>
<p><a href="http://www.coranac.com/tonc/text/affine.htm">http://www.coranac.com/tonc/text/affine.htm</a> </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="math_8h_source.html">math.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
